﻿using System.ServiceProcess;
using Broadbeach.Core;

namespace Broadbeach.Service
{
    public class Service : ServiceBase
    {
        private readonly Application _application;

        public Service(Application application)
        {
            _application = application;
        }

        protected override void OnStart(string[] args)
        {
            _application.Start();
            base.OnStart(args);
        }

        protected override void OnStop()
        {
            _application.Stop();
            base.OnStop();
        }
    }
}